package cliente.GUI;

import java.awt.*;
import javax.swing.*;

public class PanelIP extends JPanel
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private JPanel panel;
	private JPanel panel2;
	public JTextField ip;
	private JLabel IP;
	public JButton Aceptar;
	public JButton Cancelar;
	
	public PanelIP()
	{
		panel = new JPanel();
		panel2 = new JPanel();
		Aceptar = new JButton("Aceptar");
		Cancelar = new JButton("Cancelar");
		ip = new JTextField();
		IP = new JLabel("   IP: ");
		
		ip.setText("127.0.0.1");
		
		panel.setLayout(new GridLayout(1, 2));
		panel.add(IP);
		panel.add(ip);
		
		panel2.setLayout(new GridLayout(1, 2));
		panel2.add(Aceptar);
		panel2.add(Cancelar);
		
		this.setLayout(new BorderLayout());
		this.add(panel, "North");
		this.add(panel2, "South");
	}

	public static void main (String []args)
	{
		JFrame f = new JFrame();
		f.setLayout(new BorderLayout());
		f.add(new PanelIP(), "Center");
		f.pack();
		f.setVisible(true);
	}
}